package lambda.string;

public class ReplaceAllDemo {
    public static void main(String[] args) {
        String str="abc123def456ghi";
        str =str.replaceAll("[a-z]+","NUMBER");
        System.out.println(str);
        //和谐用语
        String regex="(wqnmlgb|dsb|cnm|nc|nmsl|wrsndm|djb)";
        String message="wrsndm!你个dsb!你太nc了,你个djb";
        message=message.replaceAll(regex,"***");
        System.out.println(message);
    }
}
